Snakes in Space

Using Python and Jupyter

Wesley Banfield
(Mon P'ti [Monty])

Python

Yes Python is cool and you can do some neat stuff with it:
  • Automate processes / do things software can't
Yes Python is cool and you can do some neat stuff with it:
  • Automate processes / do things software can't
  • Functions
  • 
    								def add(a, b):
    									return a + b
    							
Yes Python is cool and you can do some neat stuff with it:
  • Automate processes / do things software can't
  • Functions
  • Variable overloading / No need to predeclare variables
  • 
    								def add(a, b):
    									return a + b
    
    								add(1, 2) = 3
    								add("1", "2") = "12"
    							
Yes Python is cool and you can do some neat stuff with it:
  • Automate processes / do things software can't
  • Functions
  • Variable overloading / No need to predeclare variables
  • 
    								def add(a, b):
    									return a + b
    
    								add(1, 2) = 3
    								add("1", "2") = "12"
    							
  • No Compiling
  • Reasonable speed with scientific packages written in C/C++ or Fortran

But ...

  • Standard Python is still written as scripts
    • Have to reexcute everything when changing one thing
    • Can be hard to understand what each part of the code does
  • Standard plotting is to file and non interactive

Jupyter

Iterative

  • Sequential execution of code
  • Variables stay present in kernel (workspace) - See Notebook

Combination of Script and Console

Interactive

Possibility to interact with your data - See Notebook DOESN'T USE X11 FORWARDING!!!!

Resources

Where to use Jupyter:


  • Modelserver
    1. Connect via ssh with port forwarding (see Doc for more details)
    2. Navigate to http://localhost:9999
  • jupyter.osupytheas.fr
    1. Connect via ssh to Rubicon
    2. connect via ssh to jupyter.osupytheas.fr (this creates home directory on server)
    3. Navigate to https://jupyter.osupytheas.fr
    4. Enter OSU credentials
  • Local Machine - Please talk to Wesley Banfield for best practices
  • Binder

Python

Interactive Graphing